{{ partial("partials/crumb", ["data": crumbData]) }}
<div class="row" style="padding-bottom:20px;">
    <div class="col-md-4"><button type="button" class="btn btn-default" data-toggle="modal" data-target="#exampleModal">创建目录</button></div>
    <div class="col-md-8 text-right"><i class="fa fa-info-circle"></i> <a href="/readme.html#dir" target="_blank">查看帮助</a></div>
</div>
{% if dir is not empty %}
<table class="table table-hover">
    <thead>
    <tr>
        <th width="5%">#</th>
        <th width="10%">类型</th>
        <th>文件名</th>
        <th width="10%">文件大小</th>
        <th width="16%">修改时间</th>
        <th width="10%">操作</th>
    </tr>
    </thead>
    <tbody>
    {% for k,v in dir %}
    {% set pathAll = path~'/'~v['name'] %}
    <tr>
        <th scope="row"></th>
        <td>{{ v['type'] }}</td>
        {% if v['type'] == 'FOLDER' %}
        <td><a href="/{{ siteid }}/dir/index?path={{ path }}/{{ v['name'] }}">{{ path }}/{{ v['name'] }}</a></td>
        {% else %}
        <td>{{ path }}/{{ v['name'] }}</td>
        {% endif %}
        <td>{{ v['size'] }}</td>
        <td>{{ v['friendlytime'] }}</td>
        <td>{{ path == '/zip' ? '<a href="javascript:;" class="deploy" data-path="'~v['name']~'" data-siteid="'~siteid~'">发布到线上</a> ' : '' }}{{ !in_array(pathAll, defaultFolder) ? '<a href="javascript:;" class="btn btn-primary btn-sm btn-bordered">删除</a>' : ''}}</td>
    </tr>
    {% endfor %}
    </tbody>
</table>
{% else %}
<div class="well well-lg text-center">哇偶！{{ path is empty ? '/' : path }} 下空空如也，啥也没有。<a href="javascript:window.history.go(-1);">返回</a></div>
{% endif %}
